/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background-color: #f5f7fa;
}

/* 注册容器 */
.register-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    /* background: url('https://bpic.588ku.com/back_pic/05/72/32/435bbc10ab227a1.jpg'); */
    padding: 20px;
    position: relative;
    background-size: cover;
    /* 等比例缩放覆盖整个容器，可能裁剪 */
    background-position: center;
    background-repeat: no-repeat;
}

/* 注册框 */
.register-box {
    background-color: rgba(255, 255, 255, 0.5);
    /* 白色背景，50% 透明 */
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    transition: transform 0.3s ease;
    z-index: 1;
}

.register-box:hover {
    transform: translateY(-5px);
}

/* 注册标题 */
.register-title {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
    position: relative;
}

.register-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    margin: 10px auto 0;
    border-radius: 3px;
}

/* 表单组 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}

.form-group input:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.form-group input.error {
    border-color: #e74c3c;
}

/* 错误信息 */
.error-message {
    display: block;
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
}

/* 密码容器 */
.password-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-container input {
    padding-right: 50px;
}

/* 切换密码可见性按钮 */
.toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 5px;
    color: #666;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #4facfe;
}

/* 注册按钮 */
.register-button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.register-button:hover:not(:disabled) {
    background: linear-gradient(90deg, #3ea3fd, #00e0fc);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

.register-button:active:not(:disabled) {
    transform: translateY(0);
}

.register-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 登录链接 */
.login-link {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

.to-login-btn {
    background: none;
    border: none;
    color: #4facfe;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    margin-left: 5px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.to-login-btn:hover {
    color: #3ea3fd;
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .register-box {
        padding: 25px;
    }

    .register-title {
        font-size: 24px;
    }
}

/* 添加表单动画效果 */
.form-group input:focus+.error-message {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* 输入框聚焦时的图标效果 */
.form-group {
    position: relative;
}

.form-group input:focus::placeholder {
    color: #4facfe;
    transition: color 0.3s ease;
}

/* 成功模态框样式 */
.success-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.success-modal {
    background: white;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 50%;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
    font-weight: bold;
    margin: 0 auto 20px;
    animation: scaleIn 0.5s ease-out;
}

.success-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
    animation: fadeInUp 0.6s ease-out;
}

.success-message {
    color: #666;
    font-size: 16px;
    margin-bottom: 20px;
    animation: fadeInUp 0.7s ease-out;
}

.success-progress-bar {
    width: 100%;
    height: 4px;
    background-color: #e1e5e9;
    border-radius: 2px;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
}

.success-progress {
    height: 100%;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    width: 0;
    animation: progress 2s ease-out forwards;
}

/* 模态框动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes progress {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}








/* 动画效果 */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

/* 错误模态框覆盖层 */
.error-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

/* 错误模态框 */
.error-modal {
    background: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

/* 错误图标 */
.error-icon {
    font-size: 50px;
    margin-bottom: 20px;
    animation: scaleIn 0.5s ease;
}

/* 错误标题 */
.error-title {
    color: #e74c3c;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    animation: fadeInUp 0.4s ease;
}

/* 错误消息 */
.error-message {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
    animation: fadeInUp 0.5s ease;
}

/* 错误关闭按钮 */
.error-close-btn {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease;
}

.error-close-btn:hover {
    background: linear-gradient(90deg, #c0392b, #a93226);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.error-close-btn:active {
    transform: translateY(0);
}

/* 加载旋转器 */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

/* 动画定义 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}